#ifndef __PAGELIBPREPROCESSOR_HPP_
#define __PAGELIBPREPROCESSOR_HPP_

#include "WebPage.hpp"

#include <vector>
#include <unordered_map>

using std::vector;
using std::unordered_map;
using std::pair;

class PageLibPreprocessor
{
    friend class PageLib;
public:
    PageLibPreprocessor (std::vector<WebPage>& webpage) : _pageList(webpage){}
    ~PageLibPreprocessor(){}
    /* PageLibPreprocessor(Configuration & conf){} */
    void doProcess();
    void cutRedundantPages();

private:
    vector<WebPage>& _pageList;//网页库
    unordered_map<int,pair<int,int>>_offsetLib;//偏移库容器
    unordered_map<string,vector<pair<int,double>>> _invertIndexTable;
};

#endif
